package cn.wolfcode.result;

import lombok.Getter;
import lombok.Setter;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.spring.aop.SpringAnnotationResolver;
import org.springframework.util.StringUtils;

import java.lang.annotation.Retention;

/**
 * @Description: 分页查询实体类
 * @Author: 伍家钰
 * @Date: 2020/7/5 18:59
 * @Version: 1.0
 */
@Getter
@Setter
public class QueryObject {
    /**
     * 模糊查询的关键字,因为很多类需要使用,所以定义在QueryObject中
     */
    private String keyWord;
    private int currentPage = 1;
    private int pageSize = 5;

    public String getKeyWord() {
        if (StringUtils.hasText(keyWord)) {
            return keyWord.trim().replaceAll(" ", "");
        }
        return null;
    }
    /**
     * 查询的开始索引
     * @return :
     */
   /* private int getStart() {
        return ((this.currentPage - 1) * pageSize);
    }*/
}
